﻿using System;
using System.Runtime.CompilerServices;
using ESRI.ArcGIS.SystemUI;
using DevComponents.DotNetBar;
using ESRI.ArcGIS.Geodatabase;
using ESRI.ArcGIS.Carto;

namespace PlanningGIS.Framework
{    
    /// <summary>
    /// 基础系统应用程序事件
    /// </summary>
    public interface IApplicationEvents
    {
        /// <summary>
        /// 当前的操作按钮改变事件
        /// </summary>
        event OnCurrentToolChangedEventHandler OnCurrentToolChangedEvent;

        /// <summary>
        /// 打开工作区事件
        /// </summary>
        event IApplicationEvents_OpenDocumentEventHandler OpenedDocumentEventHandler;

        /// <summary>
        /// 地图改变事件
        /// </summary>
        event MapChangedEventHandler MapChanged;
    }

    /// <summary>
    /// 打开工作区委托
    /// </summary>
    public delegate void IApplicationEvents_OpenDocumentEventHandler();
    /// <summary>
    /// 地图改变事件委托
    /// </summary>
    /// <param name="map">新的map对象</param>
    public delegate void MapChangedEventHandler(IMap map);
    /// <summary>
    /// 当前的操作按钮改变委托
    /// </summary>
    /// <param name="tool"></param>
    public delegate void OnCurrentToolChangedEventHandler(ITool tool);
    /// <summary>
    /// 主窗体地图、布局、三维容器页选择改变委托
    /// </summary>
    public delegate void OnMapPageSwitchEventHandler();    
    /// <summary>
    /// 按钮项单击事件委托
    /// </summary>
    /// <param name="obj"></param>
    public delegate void OnItemClickEventHandler(object obj);
    /// <summary>
    /// 属性列表值改变委托
    /// </summary>
    public delegate void OnPropertyGridValueChangedEventHandler();    
    /// <summary>
    /// 无參异步调用委托
    /// </summary>
    public delegate void InvokeEventHandler();
    /// <summary>
    /// 设置进度条的最大值委托
    /// </summary>
    /// <param name="max"></param>
    public delegate void SetProcessBarMax(int max);
    /// <summary>
    /// 设置进度条的当前值委托
    /// </summary>
    /// <param name="current">当前值</param>
    public delegate void SetProcessBarCurrent(int current);
    /// <summary>
    /// 显示假进度条委托
    /// </summary>
    /// <param name="showOrNot">是否显示</param>
    public delegate void ShowLoadingProcessBar(bool showOrNot);
    /// <summary>
    /// 该委托传递进度条的当前值，当前值是个数与总数的百分比，进度条默认是100，这样可以少用一个委托
    /// </summary>
    /// <param name="value"></param>
    public delegate void RefreshProcessBar(int value);
}

